#ifndef LOGINDIALOG_H
#define LOGINDIALOG_H

#include <QDialog>
#include "mypushbutton.h"
#include "logindatabase.h"
#include "student.h"
#include <vector>
#include <exception>
#include <iostream>
#include <cstring>
#include <stdlib.h>
#include <sstream>
#include <iomanip>

class QLabel;
class QLineEdit;
class QPushButton;

class LoginDialog : public QDialog
{
    Q_OBJECT
public:
    explicit LoginDialog(QWidget *parent = 0);
    ~LoginDialog();
    void quit(MyPushButton *ExitButton);
    void regist();
    void regWindow();
    void regDbNewAccount();
public slots:
    // void login();
private:

    QLabel *loginPic;

    QLabel *userLabel;
    QLabel *pwdLabel;

    QLineEdit *userEditLine;
    QLineEdit *pwdEditLine;

    QString Username;
    QString Password;

    MyPushButton *loginBtn;
    MyPushButton *exitBtn;

    QLabel *regLabel;
    QLabel *forgetLabel;

    MyPushButton *regBtn;
    MyPushButton *forgetBtn;

    LoginDatabase db;
};

#endif // LOGINDIALOG_H
